<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'gallery-form',
	'enableAjaxValidation'=>false,
)); ?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>

	<div class="row">
		<?php echo $form->labelEx($model,'gal_name'); ?>
		<?php echo $form->textField($model,'gal_name',array('size'=>45,'maxlength'=>45)); ?>
		<?php echo $form->error($model,'gal_name'); ?>
	</div>	
  <div class="row">
		<?php echo $form->labelEx($model,'gal_description'); ?>
		<?php //Example with Model
      $this->widget('ext.editMe.ExtEditMe', array(
    'model'=>$model,
    'attribute'=>'gal_description',
    'htmlOptions'=>array('option'=>'value'),)); 
  ?>
		<?php echo $form->error($model,'gal_description'); ?>
	</div>
	<div class="row">
	 <?php echo $form->hiddenField($model,'pag_code',array('readonly'=>'readonly')); ?>
	</div>

	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->